home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
076-100
/
085
/
rocket
/
dumpsprite.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-13
|
685b
|
28 lines
#include <intuition/intuition.h>
#define INTUITION_REV 1
struct IntuitionBase *IntuitionBase;
main()
{
struct Preferences prefs;
int i;
IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", INTUITION_REV);
if( IntuitionBase == NULL )
{
puts("can't open intuition\n");
exit(-1);
}
GetPrefs(&prefs, sizeof prefs);
printf("USHORT sprite_colors[3] = { 0x%04x, 0x%04x, 0x%04x };\n",
prefs.color17, prefs.color18, prefs.color19);
printf("USHORT sprite[%d] = {\n", POINTERSIZE);
for(i = 0; i < POINTERSIZE; i += 2)
printf("\t0x%04x, 0x%04x%s\n",
prefs.PointerMatrix[i],
prefs.PointerMatrix[i+1],
(i+2<POINTERSIZE)?",":"");
printf("};\n");
}